#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
    int mon = 1, num = 1;
    int a[100];
    a[0] = 1;
    a[1] = 1;
    while (scanf("%d", &mon) != EOF) {
        if (mon > 2) {
            for (int i = 2; i < mon; i++) {
                a[i] = a[i - 1] + a[i - 2];
                num = a[i];
            }
        }
        else
            num = 1;
        printf("%d\n", num);
    }
}